package EXC_BROADTHROWS;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Collection;
import java.util.Iterator;

public class Example {
    public void processFile(String fileName) throws Exception {
        InputStream is = new FileInputStream(fileName);
        // do something
    }
    public int calculateSum(Collection data) throws Throwable {
        int sum = 0;
        for (Iterator it = data.iterator(); it.hasNext();) {
            String element = (String) it.next();
            int i = Integer.parseInt(element);
            sum += i;
        }
        return sum;
    }
}
